package com.qbccn.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import java.util.Map;

/**
 * OKHttp3
 * <p>
 * Description: Map、JSON 对象转换工具类
 * </p>
 *
 * @version v1.0.0
 * @date 2020-02-20
 */
public class MapUtils {

  /**
   * 字符串转换为 Map<String, Object>
   * @param jsonString
   * @return
   */
  public static Map<String, Object> json2map(String jsonString) {
    JSONObject jsonObject = JSONObject.parseObject(jsonString);
    return JSON.toJavaObject(jsonObject, Map.class);
  }


}
